﻿using System;
using Dynamic.DataStructures;

namespace Dynamic.Application
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Console.WriteLine("Stack.");
            Stack<int> stack = new Stack<int>();
            int count = stack.Count;

            stack.Push(10);
            stack.Push(20);
            stack.Push(30);
            stack.Push(40);
            stack.Push(50);
            
            stack.Peek();

            while (stack.Count != 0)
            {
                Console.WriteLine(stack.Pop());                
            }

            Console.WriteLine("\nQueue.");
            Queue<int> queue = new Queue<int>();
            queue.Enqueue(10);
            queue.Enqueue(20);
            queue.Enqueue(30);
            queue.Enqueue(40);
            queue.Enqueue(50);

            queue.Peek();

            while (queue.Count != 0)
            {
                Console.WriteLine(queue.Dequeue());
            }
        }
    }
}
